Method for determining connection topology of home network

ABSTRACT

A method is provided in order to determine connection topology of a home network. The main idea of the present invention is to send out a topology determination message on each link of the network, wherein the topology determination message is constituted of two consecutive packets, first one being a broadcast packet with a predetermined payload that identifies it as a topology determination packet, and second one being a unicast packet with the same content and a non-existent destination MAC address. If a node receives both the broadcast and unicast packet from a sending node, the sending node is determined to be on the same physical link with said receiving node and the MAC address of the sending node is added into a local link nodes list of said receiving node, otherwise if said receiving node receives only the broadcast packet from the sending node, the send node is determined not to be on the same physical link with said receiving node.

FIELD OF THE INVENTION

The present invention relates to a method for determining connectiontopology of Ethernet network, and more particularly to the method ofdetermining connection topology of home network.

BACKGROUND OF THE INVENTION

In the context of a home network, it could be desirable to haveinformation on the connection topology of the network. Home appliancesare generally organized in a home environment around passive equipmentlike hubs or switches. Most of the time, these devices do not have anysoftware for remote control and administration, they do not have theirown IP address, in one word, they are transparent for the appliances.

However, they are not transparent in terms of network topology andmessages propagation. The two main devices that are under considerationhere are the hubs and the switches. As shown in FIG. 1 a, hubsconcentrate all the traffic in one node, i.e. each packet received onany interface is sent to all the other interfaces. As shown in FIG. 1 b,a more intelligent work is done by the switch, as the packet aretransmitted only on the interface where there could be interested nodes(a unicast packet is routed on the interface where the target is pluggedand a broadcast packet is sent to all interfaces). The filtering couldbe done at the IP or Ethernet level.

Most of the products provided for standard consumers do the filtering atthe Ethernet level, and most of the time they are unmanaged. Thereforeit is desirable to provide a method to determine the Ethernet topologyfor the home network that consists of various home appliances organizedaround hubs and switches.

The most interesting information to extract from the network topology isto know which node of a certain terminal is separated by a switch. Inthat case, any traffic collision on the Ethernet bus could be avoided,when the target devices connected on a hub send unicast packets.

There are some conventional topology determination methods used incomputer network systems, such as Ethernet, Token Ring, or Token Busnetworks.

As indicated in European patent application No. EP0892523, a method andsystem for detection of bridged and repeated network device connectionsare provided. According to the preceding patent application, the term“bridged network device” is interchangeable with the term “switch”, andthe term “repeated network device” is used to extend the length,topology, or interconnectivity of a physical cabling medium, andtherefore corresponds the term “hub”. One preferred embodiment of thementioned invention is accomplished by sending out test packets andnoting special qualifiers. To test any given connection, a “priming”packets is initially sent out in case a switch is attached so as tocause the switch to update its address table. A first test packet withidentical Source Address (SA) and Destination Address (DA) is then sentout on one link to test if the connection is a repeated loop. Thendepending on the testing result of the first test packet, a secondpacket using a broadcast DA, a multicast DA, or a non-existent unicastDA is sent out for performing testing of a switched connection.

In US patent application of No. US2003/0225916 filed on May 30, 2002, asystem and methods for implementing a data link layer communicationprotocol, such as Spatial Reuse Protocol (SRP) designed for use in abidirectional, counter-rotating ring network are provided. Oneembodiment of this invention discloses a topology discovery processwhich generates a topology map in the form of a doubly linked listreflecting the results. The topology discovery process as claimed inthis application comprises steps of transmitting a topology discoverypacket; receiving said topology discovery packet after said topologydiscovery packet is updated by one or more nodes in a network coupled tothe computer system; and generating a topology map of the network.

However, both of the above mentioned prior arts are complicated.Moreover, all existing topology determination methods of prior art arealso failed to give any inspiration and teachings for the presentinvention. Therefore, a simple and efficient method for determiningconnection topology of the home network is greatly desirable.

SUMMARY OF THE INVENTION

According to the present invention, a method is provided in order todetermine connection topology of a home network, which is constituted bya plurality of nodes organized around multiple hubs and switches.

The inventive method comprises a step of transmitting a topologydetermination message in a random sequence one by one by the pluralityof nodes, wherein said topology determination message includes twoconsecutive packets, first one being a broadcast packet with apredetermined payload identifying it as a topology determination packet,and second one being a unicast packet with the same content and anon-existent destination MAC address. The connection topology of all thenodes are determined upon receiption of the topology determinationmessage based on following rules: i) if a node receives both of thebroadcast packet and the unicast packet from a sending node, the sendingnode is determined to be on the same physical link with said receivingnode; ii) if said receiving node receives only the broadcast packet, thesending node is determined not to be on the same physical link with saidreceiving node. Afterwards, a list of local nodes for each node isgenerated and updated by adding the MAC address of the sending node tothe list of said receiving node when the sending node is determined tobe on the same physical link with said receiving node.

Advantageously the connection topology of the home network is determinedand exhibits clearly in the list of local nodes showing which nodes areon the same physical link and which nodes are separated by a switchthrough the foregoing topology determination process.

BRIEF DESCRIPTION OF DRAWINGS

FIGS. 1 a and 1 b are diagrams showing the working principle of theconventional hubs and switches used in a home network;

FIG. 2 shows a flow diagram illustrating the processing steps of themethod according to the present invention; and

FIGS. 3 a to 3 e give an example of a home network explaining theoperation of the process in accordance with the present invention.

DETAIL DESCRIPTION OF PREFERRED EMBODIMENTS

The present invention provides a method for determining connectiontopology of Ethernet network, particularly home network, which comprisesa plurality of nodes organized around multiple hubs and switches.

The processing of the inventive method is based on the following rules:

-   -   On a same physical link or when plugged on a hub (let's say        logical link), all nodes can see the traffic of the other nodes,        even if the target device of the traffic does not exist.    -   A unicast packet is routed to the interface on which the target        node is plugged in a switch. If the target does not exist, the        message is discarded by the switch.    -   A broadcast packet is seen by every node in the network.

The main idea of the present invention is to send out topologydetermination messages on each link of the network in order to find outwhich nodes see the message, wherein the topology determination messageis constituted of two consecutive packets, the first one being abroadcast packet with a predetermined payload that identifies it to be atopology determination packet, and the second one being a unicast packetwith the same content and a non-existent destination MAC address. Thenodes which can see this topology determination message on the networkare determined to be on the same physical/logical link.

FIG. 2 is a flow diagram illustrating the processing steps of the methodin accordance with the present invention. First, when the topologydetermination process starts, all the traffic communication on thenetwork stops as seen in step 10. In step 20, two timers T₀, T₁ areinitiated when the communication on the network stops. T₀ is a fixedtime delay defining the whole duration of the process. T₁ is a randombounded time delay defining a time period between the beginning of theprocess and the starting of the transmitting of the topologydetermination message on the network, and obviously T₁<T₀. It should beunderstood that the T₁ random bounded time delay is intended to avoidcollisions on a same physical link, as T₁ is randomly calculated, eachone of the plurality of nodes N_(i) (i=1 to n) has been given adifferent T₁ random bounded time delay, so that the different nodesN_(i) have a few chance to access the Ethernet bus at the same time. InStep 30, nodes N_(i) respectively send out the topology determinationmessage when their corresponding T₁ random bounded time delayrespectively expire, in such a way the topology determination messagesare respectively sent out in a random sequence one by one from thesending nodes N_(i). Normally, in the transmission of the topologydetermination message, the broadcast and unicast packets must be sentone after another, without collisions or other packets between them. Ifa collision is detected, the previous timer T₁ is restarted with a newrandom bounded delay T₁′ which is to be calculated according to the timeremaining before expiration of the timer T₀.

Subsequently, in step 40, each time a receiving node N_(i+j) (j≠i &i+j=1 to n) receives the broadcast packet from a sending node N_(i), atimer with a T₂ delay is automatically triggered, and then if no unicastpacket is received during this T₂ time delay, the sending node N_(i) isassumed not to be on the same physical/logical link of said receivingnode N_(i+j), which is determined in step 50, otherwise, if the unicastpacket is received from the sending node N_(i) before the expiration ofT₂, then the sending node N_(j) is assumed to be on the samephysical/logical link of said receiving node N_(i+j), which isdetermined in step 60. In case the sending node N_(i) and the receivingnode N_(i+j) are determined to be on the same physical/logical link, thedestination MAC address of the sending node N_(i) is added to a list oflocal nodes of said receiving node N_(i+j) in step 70. In this scheme,T₂<<T₁, wherein timer T₂ is for example a few milliseconds.

Next, step 80 is to determine whether the T₀ fixed time delay for theprocess has expired, if yes, then it goes to step 90, and thecommunication of the network resumes, thus the process of the topologydetermination is ended.

With reference to FIGS. 3 a to 3 e, the operating of topologydetermination process will be described in detail through a simplifiedexample. As shown in FIG. 3 a, all nodes on the same logical link (samephysical link or connected with a hub) are drawn on the same link andthe different logical links are organized around a switch. When theprocess initiates, all nodes stop the communications and start the timerT₀ and T₁. For simplification, we will assume that the different T₁timers expire for the nodes in the following order: A, B, C, D, E, andF.

As shown in FIG. 3 b, when timer T₁ expires, node A makes a transitionto a state of SEND MSG, while all the other nodes remain in the WAITstate. Now as shown in FIG. 3 c, Node A in the state of SEND MSG sendsout the broadcast packet on each link of the network. The rest of thenodes B, C, D, E, and F having received the broadcast packet maketransition from the state of WAIT into WAIT UNICAST state and start theT₂ timer. As shown in FIG. 3 d, during the timer T₂ node A sends out theunicast packet. The unicast packet is blocked by the switch, but notblocked on the local link which is not separated by the switch.Therefore, only nodes B and C will receive this unicast packet and makea transition to LINK LOCAL state. The other nodes D, E, F will stayunder the WAIT UNICAST state and keep their list of local nodes emptyuntil the timer T₂ expires. Afterwards, the nodes B and C go through thetransitional state LINK LOCAL in response to the messages sent by nodeA, the MAC address of the sending node A is added to list of localnodess of the receiving nodes B, C, as shown in FIG. 3 e. The list oflocal nodes of Nodes D, E and F remains empty when timer T₂ expired, theresult is seen in table 1 as following: TABLE 1 Node Content of list oflocal nodes A B A C A D E F

The process goes on with node B which follows the same steps asforegoing description. During the process, A and C will go through theLINK LOCAL state, so after that, the previous table is updated asfollowing: TABLE 2 Node Content of list of local nodes A B B A C A, B DE F

When the timer T₁ expires at node C. Only A and B will go through theLINK LOCAL state, the results as following: TABLE 3 Node Content of listof local nodes A B, C B A, C C A, B D E F

Then the timer T₁ is expired at node D, as only node E is on the samelink, it is the only node to make a transition through state LINK LOCALand the list of local nodes is only updated at node E, as seen infollowing table: TABLE 4 Node Content of list of local nodes A B, C B A,C C A, B D E D F

When the timer T₁ expires at node E, only D goes through the LINK LOCALstate, the MAC address of node E is added to the list of local nodes ofnode D as following: TABLE 5 Node Content of list of local nodes A B, CB A, C C A, B D E E D F

Finally when the timer T₁ expires at node F, where no node updates itslist, as F is alone on its link, the result is as follows: TABLE 6 NodeContent of list of local nodes A B, C B A, C C A, B D E E D F

In the end, all the nodes have a list containing the MAC address of thenodes sharing a common link therewith. This list of local nodes will beused to optimize the communications with these nodes in terms ofcollision detection and collision avoidance. For instance, as node F hasan empty list, it can avoid implementing any collision avoidancemechanisms, and only rely on a light collision detection mechanism forthe frames coming from the switch, and thus minimize delays in Ethernettransmission on this link.

1. A method for determining connection topology of a home network, whichis constituted by a plurality of nodes organized around multiple hubsand switches, comprising steps of: transmitting a topology determinationmessage in a random sequence one by one by the plurality of nodes;determining the connection topology of all the nodes one by one uponreception of the topology determination message; generating and updatinglists of local nodes of all the nodes; wherein said topologydetermination message includes two consecutive packets, first one beinga broadcast packet with a predeterimined payload identifying it as atopology determination packet, and second one being a unicast packetwith the same content and a non-existent destination MAC address.
 2. Themethod as claimed in claim 1, wherein the connection topology of all thenodes are determined upon reception of the topology determinationmessage based on following rules: i) if a node receives both of thebroadcast packet and the unicast packet from a sending node, the sendingnode is determined to be on the same physical link with said receivingnode; ii) if said receiving node receives only the broadcast packet, thesending node is determined not to be on the same physical link with saidreceiving node.
 3. The method as claimed in claim 2, wherein, the listof local node of the receiving node is generated and updated by addingthe MAC address of the sending node into the list, when the sending nodeis determined to be on the same physical link with said receiving node.4. The method as claimed in claim 1, wherein a first timer (T₀) with afixed time delay defining the whole duration of the process is provided.5. The method as claimed in claim 4, wherein a second timer (T₁) isprovided, which is a random bounded time delay defining a time periodbetween the beginning of the process and the starting of thetransmitting of the topology determination message.
 6. The method asclaimed in claim 5, wherein the maximum length of the second timer (T₁)is less than the length of the first timer (T₀).
 7. The method asclaimed in claim 5, wherein a third timer (T₂) is automaticallytriggered each time said receiving node receives the broadcast packetfrom the sending node in order to define a duration intended to wait forthe unicast packet.
 8. The method as claimed in claim 7, wherein thethird timer (T₂) is less than the second timer (T₁), and preferably lessthan a centisecond.
 9. The method as claimed in claim 8, wherein thesecond timer (T₁) is restarted with a new random bounded delay (T₁′),which is expired before the expiration of the first timer (T₀), if acollision of the topology determination message is detected.